package com.tuling.busi.controller;

import com.tuling.busi.bean.Order;
import com.tuling.busi.service.OrderService;
import com.tuling.multidatasource.annocation.Router;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: lijunwei
 * @Time: 2020/9/12 18:51
 */
@RestController
@RequestMapping("test")
public class OrderController {
   @Autowired
   private OrderService orderService;

    @RequestMapping("add")
    @Router
    public int insertOrder(Order order) {
        int i = orderService.insertOrder(order);
        return i;
    }
}
